package edu.ynu.se.xiecheng.achitectureclass.dao;

import edu.ynu.se.xiecheng.achitectureclass.common.dao.LogicDAO;
import edu.ynu.se.xiecheng.achitectureclass.entity.DeviceData_1;
import edu.ynu.se.xiecheng.achitectureclass.dto.DeviceDataDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.cache.annotation.Cacheable;

import java.time.LocalDateTime;
import java.util.List;

@Repository
public interface DeviceData_1Dao extends LogicDAO<DeviceData_1, Long> {
    @Query("SELECT s FROM DeviceData_1 s WHERE s.isDeleted = 0 ORDER BY s.timestamp DESC")
    List<DeviceData_1> findAllOrderByTimestampDesc();

} 